;;;Rerotate a selection set of entities to be horiz to the view.
;;;
;;;	AUTHOR: HENRY C. FRANCIS
;;;		425 N. ASHE ST.
;;;		SOUTHERN PINES, NC 28387
;;;              
;;;		All rights reserved without prejudice.
;;;	Copyright:	8-31-95
;;;	Edited:		8-22-05
;;;
(defun c:rerots (/)
  (princ "\nSelect Blocks: ")
  (princ)
  (SETQ rerots_ss (SSGET '((0 . "INSERT"))))
  (IF rerots_ss
    (progn
      (setq rerots_ang (- 0 (getvar"viewtwist")))
      (setq rerots_cnt 0
            rerots_sslen (sslength rerots_ss)
      )
      (while (< rerots_cnt rerots_sslen)
        (setq rerots_ent (entget (ssname rerots_ss rerots_cnt)))
        (setq rerots_ent (subst (cons 50 rerots_ang)(assoc 50 rerots_ent)rerots_ent))
        (entmod rerots_ent)
        (setq rerots_cnt (1+ rerots_cnt))
      )
    )
  )
);defun
